﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace WindowsFormsApp1
{
    public partial class Form2 : Form
    {
        public string SchoolID
        {
            get { return textBox1.Text; }
            set { textBox1.Text = value; }
        }
        public string SchoolName
        {
            get { return textBox2.Text; }
            set { textBox2.Text = value; }
        }

        public Form2()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            if (string.IsNullOrEmpty(SchoolID))
            {
                MessageBox.Show("School ID cannot be empty!");
                return;
            }

            if (string.IsNullOrEmpty(SchoolName))
            {
                MessageBox.Show("School name cannot be empty!");
                return;
            }
            DialogResult = DialogResult.OK;
            Close();
        }
    }
}
